﻿using UnityEngine;
using System.Collections;

public class RespawnPosition : MonoBehaviour {

  // Use this for initialization
  void Start () {
  
  }
  
  // Update is called once per frame
  void Update () {
  
  }

  void OnTriggerEnter (Collider other) {
    Respawn respawn = other.GetComponent<Respawn>();
    if (respawn) {
      respawn.respawnPosition = transform.position;
    }
  }
}
